/**
 * 
 */


import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
import org.hibernate.stat.Statistics;
import org.jbpm.api.ExecutionService;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

import com.emms.common.exception.FrameworkException;

/**
 * test
 * @author Administrator
 *
 */
public class CurrencyDaoTest extends JUnit {
	
	@Autowired
	private ExecutionService executionService;

	
	/**
	 * 编号获取
	 * @throws FrameworkException
	 */
	@Test
	public void test() throws FrameworkException {
		executionService.deleteProcessInstanceCascade("供应合同审核.402881e43fa25f2c013fa26389fd0001");
	}

	 public static void addPet(){
		  // 创建一个Hibernate Configuration类的实例
		  Configuration config = new Configuration().configure() ;
		  // 创建SessionFactory对象
		  SessionFactory sf = config.buildSessionFactory() ;
		  // 调用调添加方法                                                                                                                                                   

		  // 创建Statistics对象，并通过SessionFactory对象获得统计信息
		  Statistics st =  sf.getStatistics();
		  // 打印全部统计信息
		  System.out.println(st);
		  // 打印二级缓存信息
		  System.out.println(st.getSecondLevelCacheHitCount());
		 }
	 
	public static void main(String[] str){
		addPet();
	}
	
}
